package com.example.feign.clients.fallback.config;

import com.example.feign.clients.fallback.UserClientCallbackFactory;
import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Liaorun
 */
@Configuration
public class FeignConfig {

    @Bean
    public Logger.Level log() {
        // 只记录基本调用日志
        return Logger.Level.BASIC;
    }

    @Bean
    public UserClientCallbackFactory userClientCallbackFactory() {
        return new UserClientCallbackFactory();
    }
}
